﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DSS_XNA.Engine.Log;

namespace DSS_XNA.Engine.Error
{
    public class DSSException : Exception
    {
        #region Public Methods

        public DSSException(string message)
            : base(message)
        {
            Logger.Log(message, LogLevel.Minor);
            if (this.InnerException != null)
                Logger.Log(this.InnerException.Message, LogLevel.Minor);
            Logger.Log(this.StackTrace, LogLevel.Minor);
        }

        public DSSException(string message, LogLevel level)
            : base(message)
        {
            Logger.Log(message, level);
            if (this.InnerException != null)
                Logger.Log(this.InnerException.Message, level);
            Logger.Log(this.StackTrace, level);
        }

        #endregion
    }
}
